package com.diana.springcloud.cloudconsumer.feign;

import com.diana.springcloud.cloudconsumer.entity.UserEntity;
import com.diana.springcloud.cloudconsumer.feign.impl.FeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author Suna
 * @Date 2020/8/24 16:39
 */
@FeignClient(name = "cloud-provider",fallback = FeignFallbackFactory.class)
public interface UserFeignClient {

    @GetMapping("/getUser/{userId}")
    UserEntity getUser(@PathVariable int userId);
}
